{include file="public/_header" /}
<style>
    .layui-input-inline{
        margin: 5px 0px;
    }
</style>
<div class="x-nav">
      <span class="layui-breadcrumb">
        <a href="">首页</a>
        <a href="">演示</a>
        <a>
          <cite>导航元素</cite></a>
      </span>
    <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="javascript:location.replace(location.href);" title="刷新">
        <i class="layui-icon" style="line-height:30px">ဂ</i></a>
</div>
<div class="x-body">
    <div class="layui-tab-content">
        <div class="layui-tab-item layui-show">
            <div class="layui-row">
                <form class="layui-form layui-col-md12 x-so" action="{:url('Advertself/index')}" method="post">
                    <input type="hidden" name="code" value="1">
                    <input type="text" name="username"  placeholder="请输入关键字搜索" autocomplete="off" class="layui-input" value="{$name ? $name : '';}">
                    <button class="layui-btn" lay-submit="" lay-filter="sreach1"><i class="layui-icon">&#xe615;</i></button>
                </form>

                <form class="layui-form layui-col-md12 x-so" action="{:url('Advertself/index')}" method="post">
                    <input type="hidden" name="code" value="2">
                    <input class="layui-input" placeholder="开始日" name="start" id="start">
                    <input class="layui-input" placeholder="截止日" name="end" id="end">
                    <div class="layui-input-inline">
                        <select id="pass" name="pass" class="pass">
                            <option value="0">审核状态</option>
                            <option value="1">待处理</option>
                            <option value="2">已通过</option>
                            <option value="3">未通过</option>
                        </select>
                    </div>
                    <div class="layui-input-inline">
                        <select id="industry" name="industry" class="valid">
                            <option value="shentong">行业选择</option>
                            {volist name="industry" id="user_indu" }
                            <option value="{$user_indu.id}">{$user_indu.name}</option>
                            {/volist}
                        </select>
                    </div>
                    <div class="layui-input-inline">
                        <select id="small" name="small-age" class="small">
                            <option value="0">受众年龄</option>
                            <option value="10">10</option>
                            <option value="20">20</option>
                            <option value="30">30</option>
                            <option value="40">40</option>
                            <option value="50">50</option>
                            <option value="60">60</option>
                            <option value="70">70</option>
                            <option value="80">80</option>
                            <option value="90">90</option>
                            <option value="100">100</option>
                        </select>
                    </div>
                    <div class="layui-input-inline">
                        <select id="big" name="big-age" class="big">
                            <option value="0">受众年龄</option>
                            <option value="10">10</option>
                            <option value="20">20</option>
                            <option value="30">30</option>
                            <option value="40">40</option>
                            <option value="50">50</option>
                            <option value="60">60</option>
                            <option value="70">70</option>
                            <option value="80">80</option>
                            <option value="90">90</option>
                            <option value="100">100</option>
                        </select>
                    </div>
                    <div class="layui-input-inline">
                        <select lay-filter="provinceId" id="province" name="province" class="provinceid">
                            <option value="">省份</option>
                            {volist name='province' id='pro'}
                            <option value="{$pro.provinceid}">{$pro.province}</option>
                            {/volist}
                        </select>
                    </div>
                    <div class="layui-input-inline">
                        <select id="city_id" name="city" class="childId">
                            <option value="">城市</option>
                        </select>
                    </div>
                    <button class="layui-btn" lay-submit="" lay-filter="sreach2"><i class="layui-icon">搜索</i></button>
                </form>
            </div>
            <table class="layui-table">
                <thead>
                <tr>
                    <th>ID</th>
                    <th>省份</th>
                    <th>城市</th>
                    <th>姓名</th>
                    <th>电话</th>
                    <th>行业</th>
                    <th>受众年龄</th>
                    <th>上传时间</th>
                    <th>操作</th></tr>
                </thead>
                <tbody  class="tr-data">
                {volist name='adv_self' id='user'}
                <tr>
                    <td>{$user.aid}</td>
                    <td>{$user.dprovince}</td>
                    <td>{$user.ecity}</td>
                    <td>{$user.nick_name}</td>
                    <td>{$user.cname}</td>
                    <td>{$user.fname}</td>
                    <td>{$user.attr_age}</td>
                    <td>{$user.create_time|date="Y/m/d",###}</td>
                    <td class="td-manage">
                        <a title="查看"  onclick="x_admin_show('查看','{:url('Advertself/update',['id'=>$user.aid])}',700,450)" href="javascript:;">
                            <i class="layui-icon">查看</i>
                        </a>
                    </td>
                </tr>
                {/volist}
                </tbody>
            </table>
        </div>
        <div class="page">
            {$adv_self->render()}
        </div>
    </div>
    {include file="public/_footer" /}
    <script>
        layui.use('laydate', function(){
            var laydate = layui.laydate;

            //执行一个laydate实例
            laydate.render({
                elem: '#start' //指定元素
            });

            //执行一个laydate实例
            laydate.render({
                elem: '#end' //指定元素
            });
        });

        /*用户-停用*/
        function member_stop(obj,id){
            layer.confirm('确认要停用吗？',function(index){

                if($(obj).attr('title')=='启用'){

                    //发异步把用户状态进行更改
                    $(obj).attr('title','停用')
                    $(obj).find('i').html('&#xe62f;');

                    $(obj).parents("tr").find(".td-status").find('span').addClass('layui-btn-disabled').html('已停用');
                    layer.msg('已停用!',{icon: 5,time:1000});

                }else{
                    $(obj).attr('title','启用')
                    $(obj).find('i').html('&#xe601;');

                    $(obj).parents("tr").find(".td-status").find('span').removeClass('layui-btn-disabled').html('已启用');
                    layer.msg('已启用!',{icon: 5,time:1000});
                }

            });
        }

        layui.use(['form','layer'], function() {
            $ = layui.jquery;
            var form = layui.form
                , layer = layui.layer;
            var util = layui.util;

        });

        //城际联动
        var SCOPE = {
            "city_url": "{:url('admin/Advertuser/getCity')}",
        };
    </script>
    <script>var _hmt = _hmt || []; (function() {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?b393d153aeb26b46e9431fabaf0f6190";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
    })();</script>
    </body>

    </html>